package com.xiaouyudeguang.common.dicode.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaouyudeguang.common.dicode.entity.DiCode;
import com.xiaouyudeguang.common.dicode.provider.DiCodeDaoProvider;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface DiCodeDao extends BaseMapper<DiCode> {

    @DeleteProvider(type = DiCodeDaoProvider.class, method = "query")
    int delete(String sql, @Param("param") Map<String, Object> param);

    @UpdateProvider(type = DiCodeDaoProvider.class, method = "query")
    int update(String sql, @Param("param") Map<String, Object> param);

    @SelectProvider(type = DiCodeDaoProvider.class, method = "query")
    Map<String, Object> getOne(String sql, @Param("param") Map<String, Object> param);

    @SelectProvider(type = DiCodeDaoProvider.class, method = "query")
    List<Map<String, Object>> list(String sql, @Param("param") Map<String, Object> param);

    @SelectProvider(type = DiCodeDaoProvider.class, method = "query")
    Long count(String sql, @Param("param") Map<String, Object> param);
}
